﻿using MiniApi;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddSingleton<GuidGenerator>();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
	app.UseSwagger();
	app.UseSwaggerUI();
}

app.AddUrls("http://localhost:5001");

app.MapGet("get-example", () => "Hello World");

app.ReturnJson();

app.Run();
